<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <form name="f1">
      <p>name <input type="text" name="uname" /></p>
      <p>decs <textarea name="desc"></textarea></p>
      <button type="button" name="submitBtn">提交</button>
    </form>
    <script>
      const f1 = document.f1;
      f1.submitBtn.onclick = function () {
        // 获取
        // console.log(f1.uname.value);
        // console.log(f1.desc.value);
        // 设置
        // f1.uname.value = "jack";
        f1.desc.value = "hello jack";
      };
    </script>
  </body>
</html>
